<include file="Common/header" />
<title>欠费管理</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 费用管理
	<span class="c-gray en">&gt;</span> 欠费管理
	<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
		<i class="Hui-iconfont">&#xe68f;</i>
	</a>
</nav>
<div style="padding-left: 20px;padding-top: 20px;padding-right: 20px">
	<span style="display: inline-block;width: 280px;text-align: right">
		费用类型：<span class="select-box" style="width: 200px">
		  <select class="select" size="1" name="typeid" id="typeid">
				<option value="0">--全部--</option>
				<option value="1">--水费--</option>
				<option value="2">--电费--</option>
				<option value="3">--气费--</option>
		  </select>
		</span>
	</span>
	<span style="display: inline-block;width: 280px;text-align: right;margin-left: 13px;">
		开始时间：
		<span class="select-box radius" style="width:200px">
			<input class="select form-control layer-date time" id="btime" name="btime" />
		</span>
	</span>
	<span style="display: inline-block;width: 280px;text-align: right;margin-left: 13px;">
		结束时间：
		<span class="select-box radius" style="width:200px">
			<input class="select form-control layer-date time" id="etime" name="etime" />
		</span>
	</span>
	
	<a href="javascript:;" class="btn btn-success radius"><i class="Hui-iconfont">&#xe709;</i> 查询</a> 
</div>

<div class="pd-20">
	<div class="cl pd-5 bg-1 bk-gray"> 
		<span class="r">共有数据：<strong>{$count}</strong> 条</span>
	</div>
	
	<div class="dataTables_wrapper no-footer" id="ajaxDiv">
		<include file="Paylog/arrearage_list" />
	</div>
</div>

<script type="text/javascript">
	$(document).ready(function(){
		$(".time").on('click', function(){
			laydate({istime: true, format: 'YYYY-MM-DD'});
		});
		
		$(".btn-success").on('click', function(){
			var where = {};
				where.room_id = $("#room_number").val();
				where.btime = $("#btime").val();
				where.etime = $("#etime").val();
				where.ajax = 1;
				where.typeid = $("#typeid").val();
				
			if(where.btime == "" && where.etime != ""){
				layer.msg('请选择开始时间', {icon: 5, time: 2000});
				return false;
			}
			
			var load = layer.load(2);
			$.get('arrearage.html', where, function(data){
				layer.close(load);
				$("#ajaxDiv").html(data);
			});
		});
	});
</script>
</body>
</html>